#include "foperation.h"
#include "function.h"
#include "Spline.h"
#include <iostream>
#include <vector>
using namespace std;
//int main()
//{
//	Eigen::Matrix<float, 2, 3> matrix_23;
//	matrix_23 << 1, 2, 3, 4, 5, 6;
//	cout << matrix_23 << endl;
//	return 0;
//}

/*All parameters' information except functions' is passed in through the file parameters.txt. 
This program does not intentionally distinguish the interpolation points of a function from scattered points in space. 
The interpolation points of a function are considered scattered points in 1-dimensional space
*/
int main()
{
	//pass in the parameters' info
	
	vector<vector<double>> v = foperate();
	//v[0] , ... , v[4] is the array of knots in function fA whose N = 6,11,21,41,81,respectively.
	//v[5], v[6] *** fC whose N = 11,10***
	//fA,fC are in function.h
	
	/*for (auto element : v[4])
	{
		cout << element << endl;
	}*/
	ppSpline<1, 1> spA6(v[0], fA);
	spA6.ppForm();
	//spA6.printSplinefunData();

	ppSpline<1, 1> spA11(v[1], fA);
	spA11.ppForm();
	//spA11.printSplinefunData();

	ppSpline<1,1> spA21(v[2], fA);
	spA21.ppForm();
	//spA21.printSplinefunData();

	ppSpline<1, 1> spA41(v[3], fA);
	spA41.ppForm();
	//spA41.printSplinefunData();

	ppSpline<1, 1> spA81(v[4], fA);
	spA81.ppForm();
	spA81.printSplinefunData();

}